package com.lantosec.hmrp.modules.revisit.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.revisit.vo.RevisitNoteVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 回访及复核记录 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RevisitNote extends BaseEntity<RevisitNoteVO> {

    private static final long serialVersionUID = 1L;
    public RevisitNote(RevisitNoteVO vo){
        this.revisitNoteId = vo.getRevisitNoteId();
        this.revisitTaskId = vo.getRevisitTaskId();
        this.revisitUserId = vo.getRevisitUserId();
        this.revisitUser = vo.getRevisitUser();
        this.revisitTimeStd = vo.getRevisitTimeStd();
        this.revisitTime = vo.getRevisitTime();
        this.phone = vo.getPhone();
        this.callDuration = vo.getCallDuration();
        this.remark = vo.getRemark();
        this.invalid = vo.getInvalid();
        this.reviewUser = vo.getReviewUser();
        this.reviewTime = vo.getReviewTime();
        this.reviewRemark = vo.getReviewRemark();
        this.reviewInvalid = vo.getReviewInvalid();
        this.reviewUserId = vo.getReviewUserId();
    }

    @Override
    public RevisitNoteVO convertToVO(){
        return new RevisitNoteVO(this);
    }


    /**
     * 回访记录ID
     */
    @TableId(value = "revisit_note_id", type = IdType.AUTO)
    private Integer revisitNoteId;

    /**
     * 回访任务ID
     */
    private Integer revisitTaskId;

    /**
     * 回访人ID
     */
    private String revisitUserId;

    /**
     * 回访人
     */
    private String revisitUser;

    /**
     * 规定的回访日期
     */
    private String revisitTimeStd;

    /**
     * 回访时间
     */
    private Date revisitTime;

    /**
     * 回访号码
     */
    private String phone;

    /**
     * 通话时长
     */
    private Integer callDuration;

    /**
     * 回访情况说明
     */
    private String remark;

    /**
     * 回访记录无效标识(0否,有效 1是,有效)
     */
    private Integer invalid;

    /**
     * 复核人
     */
    private String reviewUser;

    /**
     * 复核时间
     */
    private Date reviewTime;

    /**
     * 复核情况说明
     */
    private String reviewRemark;

    /**
     * 复核无效标识(0否,有效 1是,有效)
     */
    private Integer reviewInvalid;

    /**
     * 复核人ID
     */
    private String reviewUserId;


    public enum ColName {
        revisit_note_id, revisit_task_id, revisit_user_id, revisit_user, revisit_time, revisit_time_std, phone, call_duration, remark, invalid, review_user, review_time, review_remark, review_invalid, review_user_id,
    }
}
